/* 右侧选项面板样式 */

.option-panel-mask {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.option-panel-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.option-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.option-panel.open {
  transform: translateX(0);
}

/* 面板头部样式 */
.option-panel-header {
  height: 50px;
  padding: 0 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.option-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.option-panel-header .close-btn {
  width: 20px;
  height: 20px;
  cursor: pointer;
  background-image: url('../../assets/images/close.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.option-panel-header .close-btn:hover {
  opacity: 0.8;
}

/* 面板内容区域样式 */
.option-panel-content {
  flex: 1;
  padding: 20px;
  overflow: auto;
  background-color: #ffffff;
}

/* JSON编辑器样式 */
.json-editor {
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 15px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #303133;
  background-color: #fafafa;
  resize: none;
  outline: none;
  box-sizing: border-box;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.json-editor:focus {
  border-color: #409eff;
  background-color: #ffffff;
}

/* 面板底部样式 */
.option-panel-footer {
  height: 60px;
  padding: 0 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* 按钮样式 */
.option-panel-footer button {
  padding: 8px 16px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.cancel-btn {
  background-color: #ffffff;
  color: #606266;
}

.cancel-btn:hover {
  color: #409eff;
  border-color: #c6e2ff;
  background-color: #ecf5ff;
}

.confirm-btn {
  background-color: #409eff;
  color: #ffffff;
  border-color: #409eff;
}

.confirm-btn:hover {
  background-color: #66b1ff;
  border-color: #66b1ff;
}

.confirm-btn:active {
  background-color: #3a8ee6;
  border-color: #3a8ee6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .option-panel {
    width: 90%;
    max-width: 400px;
  }
}

/* 滚动条样式 */
.option-panel-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.option-panel-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.option-panel-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.option-panel-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}